/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package SickPresenter;

//import Protocol.Uint8;
import SickModel.Classes.NameIPPort;
import SickModel.ISickModel;
import SickModel.SickModel;
import SickView.ISickView;
import java.net.Inet4Address;


/**
 *
 * @author Pozytywny!
 */
public class SickPresenter implements IPresenter{
    private ISickView _view = null;
    private ISickModel _model = null;

    public void init(ISickView view) {
        _view = view;
        _model = new SickModel();
    }

    public void AddHost(String name,
            String ip1, String ip2, String ip3, String ip4, String port) {
            NameIPPort nipp = new NameIPPort();

      /*  Uint8 b[] = new Uint8[4];

        b[0] = Uint8.parseUint8(ip1);
        b[1] = Uint8.parseUint8(ip2);
        b[2] = Uint8.parseUint8(ip3);
        b[3] = Uint8.parseUint8(ip4);

        int portInt = Integer.parseInt(port);

        try{
            nipp.setNameIPPort(
                    name,
                    Inet4Address.getByAddress(Uint8.toByteArr(b)),
                    portInt);

        }
        catch(Exception e){
            
        }*/
    }

    public static void main(String[] args){
        /*Uint8 b[] = new Uint8[4];

        b[0] = Uint8.parseUint8("255");
        b[1] = Uint8.parseUint8("128");
        b[2] = Uint8.parseUint8("200");
        b[3] = Uint8.parseUint8("150");

        try{
            ;
            System.out.println(Inet4Address.getByAddress(Uint8.toByteArr(b)));

        }
        catch(Exception e){

        }*/
    }

}
